﻿Imports System.Collections.Generic
Imports Pop.Api.Response
Imports Pop.Api.Util

Namespace Pop.Api.Request
    ''' <summary>
    ''' 1.16 查询商品相关信息接口
    ''' </summary>
    Public Class GetItemInfoRequest
        Inherits PopRequest(Of GetItemInfoResponse)

        ''' <summary>
        ''' 商品编码
        ''' </summary>
        Property ItemCode As String

        ''' <summary>
        ''' 需要查询的商品信息：默认为1
        ''' 2048:商品实时浏览量信息
        ''' </summary>
        Property OptionStr As String

#Region "Overrides"
        Protected Overrides Function GetApiName() As String
            Return "item.getItemInfo"
        End Function

        Protected Overrides Function GetParameters() As IEnumerable(Of KeyValuePair(Of String, String))
            Dim parameters As New PopDictionary
            parameters.Add("itemCode", Me.ItemCode)
            parameters.Add("optionStr", Me.OptionStr)
            Return parameters
        End Function

        Protected Overrides Sub Validate()
            Me.ItemCode.ValidateRequired("itemCode")
        End Sub
#End Region

    End Class
End Namespace